home *** CD-ROM | disk | FTP | other *** search
- // Copyright (C) 1997-2002 Alias|Wavefront,
- // a division of Silicon Graphics Limited.
- //
- // The information in this file is provided for the exclusive use of the
- // licensees of Alias|Wavefront. Such users have the right to use, modify,
- // and incorporate this code into other products for purposes authorized
- // by the Alias|Wavefront license agreement, without fee.
- //
- // ALIAS|WAVEFRONT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
- // INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
- // EVENT SHALL ALIAS|WAVEFRONT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
- // CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
- // DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
- // TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- // PERFORMANCE OF THIS SOFTWARE.
- //
- // Copyright (C) 2000 Alias|Wavefront,
- // a division of Silicon Graphics Limited.
- //
- // The information in this file is provided for the exclusive use of the
- // licensees of Alias|Wavefront. Such users have the right to use, modify,
- // and incorporate this code into other products for purposes authorized
- // by the Alias|Wavefront license agreement, without fee.
- //
- // ALIAS|WAVEFRONT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
- // INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
- // EVENT SHALL ALIAS|WAVEFRONT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
- // CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
- // DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
- // TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- // PERFORMANCE OF THIS SOFTWARE.
- //
- //
- // Alias|Wavefront Script File
- // MODIFY THIS AT YOUR OWN RISK
- //
- // Creation Date: Date
- // Author: jdc rendering
- //
- // Description:
- //
- // description
- //
-
- global proc initCreateNodeOptionVars()
- {
- //
- // Description:
- // This procedure is called when hyperShadePanel.mel is sourced at
- // startup.
- // This procedure checks to see that the optionVars which correspond to
- // create render node options (normal/projection/stencil, with/without
- // placement, with/without shading group) exist. If they do not exist,
- // they are created and given default values.
- //
-
- if (!`optionVar -exists createTexturesWithPlacement`)
- {
- optionVar -intValue createTexturesWithPlacement true;
- }
- if (!`optionVar -exists create2dTextureType`)
- {
- optionVar -stringValue create2dTextureType "normal";
- }
- if (!`optionVar -exists createMaterialsWithShadingGroup`)
- {
- optionVar -intValue createMaterialsWithShadingGroup true;
- }
- }
-
- global proc refreshCreateNodeUI()
- {
- //
- // Description:
- // This procedure is (or is *supposed* to be) called from places which
- // change the value of create render node options optionVars.
- // This procedure refreshes all UI which is currently displaying the state
- // of any of those option vars.
- //
-
- // Refresh the create render node dialog, if it exists
- //
- if (`window -exists createRenderNodeWindow`)
- {
- setParent createRenderNodeWindow;
-
- // Update the create textures with placement checkbox
- //
- checkBox
- -edit
- -value `optionVar -query createTexturesWithPlacement`
- placementCheckBox;
-
- // Update the normal/projection/stencil radiobuttons
- //
- if (`optionVar -query create2dTextureType` == "normal")
- {
- radioButton
- -edit
- -select
- normalRadioBtn;
- }
- else if (`optionVar -query create2dTextureType` == "projection")
- {
- radioButton
- -edit
- -select
- projectionRadioBtn;
- }
- else // (`optionVar -query create2dTextureType` == "stencil")
- {
- radioButton
- -edit
- -select
- stencilRadioBtn;
- }
-
- // Update the create materials with shading groups checkbox
- //
- checkBox
- -edit
- -value `optionVar -query createMaterialsWithShadingGroup`
- shadingGroupCheckBox;
- }
-
- // Refresh the hypershade menus, if they exist
- //
- // ASSUMPTION:
- // This code assumes that there is only ever a maximum of one
- // hyperShadePanel, and that it is called hyperShadePanel1. If a
- // hyperShadePanel of another name exists, it will not be properly updated.
- //
- if (
- (`panel -exists hyperShadePanel1`)
- && (`panel -query -control hyperShadePanel1` != ""))
- {
- hyperShadePanelRefreshCreateBar("hyperShadePanel1");
- hyperShadePanelRefreshMenu("hyperShadePanel1", "File");
- hyperShadePanelRefreshMenu("hyperShadePanel1", "Create");
- }
-
- // Refresh the visor menus, if they exist
- //
- // ASSUMPTION:
- // This code assumes that there is only ever a maximum of one
- // visorPanel, and that it is called visorPanel1. If a
- // visorPanel of another name exists, it will not be properly updated.
- //
- if (
- (`panel -exists visorPanel1`)
- && (`panel -query -control visorPanel1` != ""))
- {
- setParent visorPanel1;
-
- setParent -menu ("visorPanelMenuFileMenu");
-
- // Update the import textures with placement checkbox
- //
- menuItem
- -edit
- -checkBox
- `optionVar -query createTexturesWithPlacement`
- includePlacementItem;
-
- if (`menu -exists ("visorPopupMenuFileMenu")`)
- {
- setParent -menu ("visorPopupMenuFileMenu");
-
- // Update the import textures with placement checkbox
- //
- menuItem
- -edit
- -checkBox
- `optionVar -query createTexturesWithPlacement`
- includePlacementItem;
- }
- }
- }
-
-